package yhao.demo.service.login.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import yhao.infra.feature.mysql.ConfigFactory;
import yhao.infra.feature.mysql.MysqlConfig;
import yhao.infra.service.config.MapperScannerConfig;

@Configuration
@Import({MysqlConfig.class})
public class AutoMapConfiguration {
    @Bean(name="autoMapperScanner")
    public MapperScannerConfig autoMapperScanner(){
        MapperScannerConfig autoMapperScanner = new MapperScannerConfig();
        autoMapperScanner.setBasePackage("yhao.demo.service.login.dao");
        autoMapperScanner.setBaseDaoBeanName(ConfigFactory.BASE_DAO_BEAN_NAME);
        return autoMapperScanner;
    }
}
